package cn.com.huzo.model.entities.master;

import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * 材料送货允差实体类
 *
 * @author 吴旭
 */
public class MaterialDaerrEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = 2723126046912281694L;
    private Long MaterialId;
    /* 条件最小值 */
    private Float Minimum;
    /* 条件最大值 */
    private Float Maximum;
    /* 允差值 */
    private Float Allowance;
    /* 计量单位 */
    private Long UomId;
    private String UomName;
    private String Description;

    public Long getMaterialId() {
        return MaterialId;
    }

    public Float getMinimum() {
        return Minimum;
    }

    public Float getMaximum() {
        return Maximum;
    }

    public Float getAllowance() {
        return Allowance;
    }

    public Long getUomId() {
        return UomId;
    }

    public String getUomName() {
        return UomName;
    }

    public String getDescription() {
        return Description;
    }

    public void setMaterialId(Long MaterialId) {
        this.MaterialId = MaterialId;
    }

    public void setMinimum(Float Minimum) {
        this.Minimum = Minimum;
    }

    public void setMaximum(Float Maximum) {
        this.Maximum = Maximum;
    }

    public void setAllowance(Float Allowance) {
        this.Allowance = Allowance;
    }

    public void setUomId(Long UomId) {
        this.UomId = UomId;
    }

    public void setUomName(String UomName) {
        this.UomName = UomName;
    }

    public void setDescription(String Description) {
        this.Description = Description;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof MaterialDaerrEntity)) {
            return false;
        }

        final MaterialDaerrEntity that = (MaterialDaerrEntity) o;

        return new EqualsBuilder()
            .append(this.getMaterialId(), that.getMaterialId())
            .append(this.getMinimum(), that.getMinimum())
            .append(this.getMaximum(), that.getMaximum())
            .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + this.getMaterialId().hashCode();
        result = 31 * result + this.getMinimum().hashCode();
        result = 31 * result + this.getMaximum().hashCode();
        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
